<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>购物车结算页</title>
  <link rel="stylesheet" type="text/css" href="__ROOT__/Static/hdjs/hdjs.css">
  <script type="text/javascript" src="__STATIC__/Js/address.js"></script>
  <script src="__ROOT__/Static/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="__STATIC__/public/js/index.js" type="text/javascript" charset="utf-8"></script>
  <link rel="stylesheet" type="text/css" href="__STATIC__/public/shop.css">
  <link rel="stylesheet" type="text/css" href="__STATIC__/public/index.css">
  <link rel="stylesheet" type="text/css" href="__ROOT__/Static/hdjs/hdjs.min.js">
  <script type="text/javascript" src="__STATIC__/Js/jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  	$(function(){
  		$('.tianxie').click(function(){
  			$('.xinxi').show(200);
  		})
  		$('.x').click(function(){
  			$('.xinxi').hide(200);
  		})
  		$('.queren').click(function(){
  			$('.xinxi').hide(200);
  			$('.dizhi').show(10);
  			var dj = $('#s1').val() + '省,' + $('#s2').val() + '市,' + $('#s3').val();
  			$('.xians3').html(dj);
            var dz = $('.shoudizhi').val();
            $('.xians4').html(dz);
            var na = $('.shouname').val();
            $('.xingming').html(na);
            var dh = $('.shoudianhua').val();
            $('.xians5').html(dh);
  		})
  		$('.jiesuan').click(function(){
  			var na = $('.shouname').val();
  			var dj = $('#s1').val() + '省,' + $('#s2').val() + '市,' + $('#s3').val();
  			var dz = $('.shoudizhi').val();
  			var dh = $('.shoudianhua').val();
  			if(na==''){
  				alert('请填写收货人姓名');
  			}else if(dj==''){
  				alert('请填写收货人地址');
  			}else if(dz==''){
  				alert('请填写收货人详细地址');
  			}else if(dh==''){
  				alert('请填写收货人联系电话');
  			}else{
  				$.ajax({
	  				type:"post",
	  				url:"{|U:'Index/Shoplist/addShop'}",
	  				data:{name:na,dj:dj,dizhi:dz,dianhua:dh},
	  				dataType:'json',
	  				success:function(phpData){
	  					if(phpData==1){
	  						 location.href="{|U:'Index/Last/index'}";
	  					}
					}
  				});
  			}
  		})
  		
  	})
  	
  	
  	var s=["s1","s2","s3"];
	var opt0 = ["请选择省","请选择市","请选择县（区）"];
	function setup(){
	for(i=0;i<s.length-1;i++)
	  	document.getElementById(s[i]).onclick=new Function("change("+(i+1)+")");
	 	change(0);
	}
	window.onload=function(){
		setup()	
	};
  </script>
</head>

<body>
   <include file="__APP__/Index/View/Common/header.html"/>
    
    <!--购物车开始-->
    <div class="shopcat">
    	<div class="shop_box">
    		<img src="__STATIC__/public/images/jiesuan.jpg"/>
    		<div class="tjdz">
    			<a href="javascript:;" class="tianxie">填写收货人信息</a>
    			<div class="xinxi">
    				<div class="x"><a href="javascript:;">X</a></div>
    				<form action="" method="post">
    					<ul class="xin1">
    						<li class="shou1">收货信息</li>
    						<li class="shou2">收货人姓名: <input type="text" name="shouname" value="" class="shouname"/></li>
    						<li class="shou2">
    							收货人地址: <select id="s1" name="province"><option>省份</option></select>
											<select id="s2" name="city"><option>地级市</option></select>
											<select id="s3" name="county"><option>市、县级市、县</option></select>
    						</li>
    						<li class="shou2">&nbsp;&nbsp; 详细地址: <input type="text" name="shoudizhi" value="" class="shoudizhi"/></li>
    						<li class="shou2">&nbsp;&nbsp; 联系电话: <input type="text" name="shoudianhua" value="" class="shoudianhua"/></li>
    						<li class="shou4"><a href="javascript:;" class="queren">确认信息</a></li>
    					</ul>
    				</form>
    			</div>
    		</div>
    		<div class="dizhi">
    			<span class="xians1">您填写的收货人信息如下.请仔细核对！</span>
    			<ul class="xians2">
    				<li class="lii1">收货人姓名: <span class="xingming"></span></li>
    				<li class="lii2">收货人地址: <span class="xians3"></span></li>
    				<li class="lii1">&nbsp;&nbsp; 详细地址: <span class="xians4"></span></li>
    				<li class="lii2">&nbsp;&nbsp; 联系电话: <span class="xians5"></span></li>
    			</ul>
    		</div>
    		<div class="gouwuche">
    			<ul>
    				<li class="li1"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a href="{|U:'Index/Daohang/index'}">继续购物</a></li>
    				<li class="li2"><a href="">购物车状态</a><span>({$zong.total_rows}/99)</span></li>
    			</ul>
    		</div>
    		
    		<ul class="shop_one">
    			<li class="li1">
    				<a href="javascript:hd_select_all('.ca_gou')" class="ca_quanxuan" style="color: #5A5A58;"></a>
					<a href="javascript:hd_reverse_select('.ca_gou')" class="ca_fanxuan" style="color: #5A5A58;"></a>
    			</li>
    			<li class="li2">店铺宝贝</li>
    			<li class="li3">单价</li>
    			<li class="li4">数量</li>
    			<li class="li5">小计(元)</li>
    			<li class="li6"></li>
    		</ul>
    		<form action="" method="post">
    		<foreach from="$shop" key="$k" value="$v">
    			
	    		<div class="wupin">
	    			<div class="ca_gou">
		    			
		    		</div>
	    			
	    			<img src="__ROOT__/{$v['img']['medium']}"/>
	    			<ul class="ul_one">
	    				<li><a href="">{$v.name}</a></li>
	    				<li>
	    					<foreach from="$v['attrSpec']" key="$kk" value="$vv">
	    						<span>{$kk}:{$vv[0]}</span>&nbsp;
	    					</foreach>
	    				</li>
	    			</ul>
	    			<div class="two">
	    				<ul class="ul_two">
	    				  <li class="li3"><span>￥{$v.price}.00</span></li>
	    				  <li class="li1"><span>{$v.num}</span></li>
	    				  <li class="li2"><span>￥{$v.total}.00</span></li>
	    			    </ul>
	    			</div>
	    			<ul class="ul_three">
	    				<li class="li1"><a href="" class="delshop" sid="{$k}"></a></li>
	    			</ul>
	    		</div>
	    		
    		</foreach>
    		</form>
    		<ul class="shop_one two">
    			<li class="li1">
    				<a href="javascript:hd_select_all('.ca_gou')" class="ca_quanxuan"></a>
					<a href="javascript:hd_reverse_select('.ca_gou')" class="ca_fanxuan"></a>
    			</li>
    			
    			<li class="li3"></li>
    			<li class="li4 one">宝贝总价<span>￥{$zong.total}.00</span></li>
    			<li class="li5"></li>
    			<li class="li2"><a href="{|U:'Index/Shop/index'}">返回购物车</a></li>
    			<li class="jiesuan"><a href="javascript:;"></a></li>
    		</ul>
    	</div>
    </div>
    
    <!--购物车结束-->
    
  
    <!--底部-->
    <div class="foot">
    	<div class="gaoduan">
    		<span>高端定制上哇噻网</span>
    	</div>
    	<div class="di">
    		<ul>
    			<li><a href="">关于我们</a></li>
    			<li><a href="">联系我们</a></li>
    			<li><a href="">媒体报道</a></li>
    			<li><a href="">创意画报</a></li>
    			<li><a href="">招贤纳士</a></li>
    			<li><a href="">版权保护</a></li>
    			<li><a href="">用户条款</a></li>
    			<li><a href="">隐私声明</a></li>
    			<li><a href="">友情链接</a></li>
    			<li><a href="">网站地图</a></li>
    			<li><a href="">帮助中心</a></li>
    			<li><a href="">手工客</a></li>
    		</ul>
    		<ul class="u1">
    			<li>北京光年创艺信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京公网安备11010502026420][京ICP证090011号]</li>
    		</ul>
    		<div class="tu">
    		   <ul>
    		   	    <li><img src="__STATIC__/public/images/2.png" alt="" /></li>
    		   	    <li><img src="__STATIC__/public/images/1.png" alt="" /></li>
    		   	    <li><img src="__STATIC__/public/images/3.png" alt="" /></li>
    		   </ul>
    	    </div>
    	</div>
    	
    </div>
    
    <div class="ding">
    	<a href="javascript:;"></a>
    </div>
    
</body>
</html>

